/**
 *
 */
import Util;
import OpenApi;

import EndpointUtil;

extends OpenApi;

init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  

  checkConfig(config);
  @endpoint = getEndpoint('cloudauth-console', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model CreateProjectRequest {
  sourceIp?: string(name='SourceIp'),
  projectType?: string(name='ProjectType'),
  projectName?: string(name='ProjectName'),
}

model CreateProjectResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  data?: {
    projectId?: string(name='ProjectId'),
    gmtCreate?: long(name='GmtCreate'),
  }(name='Data'),
  success?: boolean(name='Success'),
}

model CreateProjectResponse = {
  headers: map[string]string(name='headers'),
  body: CreateProjectResponseBody(name='body'),
}

async function createProjectWithOptions(request: CreateProjectRequest, runtime: Util.RuntimeOptions): CreateProjectResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateProject', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createProject(request: CreateProjectRequest): CreateProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return createProjectWithOptions(request, runtime);
}

model CreateSlrRoleRequest {
  sourceIp?: string(name='SourceIp'),
  roleName?: string(name='RoleName'),
  durationSeconds?: long(name='DurationSeconds'),
}

model CreateSlrRoleResponseBody = {
  requestId?: string(name='RequestId'),
}

model CreateSlrRoleResponse = {
  headers: map[string]string(name='headers'),
  body: CreateSlrRoleResponseBody(name='body'),
}

async function createSlrRoleWithOptions(request: CreateSlrRoleRequest, runtime: Util.RuntimeOptions): CreateSlrRoleResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('CreateSlrRole', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function createSlrRole(request: CreateSlrRoleRequest): CreateSlrRoleResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSlrRoleWithOptions(request, runtime);
}

model DeleteMnsServeRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
}

model DeleteMnsServeResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteMnsServeResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteMnsServeResponseBody(name='body'),
}

async function deleteMnsServeWithOptions(request: DeleteMnsServeRequest, runtime: Util.RuntimeOptions): DeleteMnsServeResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteMnsServe', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteMnsServe(request: DeleteMnsServeRequest): DeleteMnsServeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteMnsServeWithOptions(request, runtime);
}

model DeleteUserGroupRequest {
  sourceIp?: string(name='SourceIp'),
  groupId?: long(name='GroupId'),
  projectId?: string(name='ProjectId'),
}

model DeleteUserGroupResponseBody = {
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteUserGroupResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteUserGroupResponseBody(name='body'),
}

async function deleteUserGroupWithOptions(request: DeleteUserGroupRequest, runtime: Util.RuntimeOptions): DeleteUserGroupResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteUserGroup', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteUserGroup(request: DeleteUserGroupRequest): DeleteUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserGroupWithOptions(request, runtime);
}

model DeleteUserInfoRequest {
  sourceIp?: string(name='SourceIp'),
  userId?: long(name='UserId'),
  projectId?: string(name='ProjectId'),
}

model DeleteUserInfoResponseBody = {
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteUserInfoResponse = {
  headers: map[string]string(name='headers'),
  body: DeleteUserInfoResponseBody(name='body'),
}

async function deleteUserInfoWithOptions(request: DeleteUserInfoRequest, runtime: Util.RuntimeOptions): DeleteUserInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DeleteUserInfo', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function deleteUserInfo(request: DeleteUserInfoRequest): DeleteUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserInfoWithOptions(request, runtime);
}

model DescribeAllEndPointRequest {
  sourceIp?: string(name='SourceIp'),
}

model DescribeAllEndPointResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  data?: [ 
    {
      cityName?: string(name='CityName'),
      endPoint?: string(name='EndPoint'),
    }
  ](name='Data'),
  success?: boolean(name='Success'),
}

model DescribeAllEndPointResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeAllEndPointResponseBody(name='body'),
}

async function describeAllEndPointWithOptions(request: DescribeAllEndPointRequest, runtime: Util.RuntimeOptions): DescribeAllEndPointResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeAllEndPoint', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeAllEndPoint(request: DescribeAllEndPointRequest): DescribeAllEndPointResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAllEndPointWithOptions(request, runtime);
}

model DescribeBindUserIdListRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
}

model DescribeBindUserIdListResponseBody = {
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      certificateType?: string(name='CertificateType'),
      userName?: string(name='UserName'),
      certificateNo?: string(name='CertificateNo'),
      id?: long(name='Id'),
    }
  ](name='Data'),
}

model DescribeBindUserIdListResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeBindUserIdListResponseBody(name='body'),
}

async function describeBindUserIdListWithOptions(request: DescribeBindUserIdListRequest, runtime: Util.RuntimeOptions): DescribeBindUserIdListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeBindUserIdList', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeBindUserIdList(request: DescribeBindUserIdListRequest): DescribeBindUserIdListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeBindUserIdListWithOptions(request, runtime);
}

model DescribeCertificateTypeListRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
}

model DescribeCertificateTypeListResponseBody = {
  requestId?: string(name='RequestId'),
  typeList?: [ string ](name='TypeList'),
}

model DescribeCertificateTypeListResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeCertificateTypeListResponseBody(name='body'),
}

async function describeCertificateTypeListWithOptions(request: DescribeCertificateTypeListRequest, runtime: Util.RuntimeOptions): DescribeCertificateTypeListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeCertificateTypeList', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeCertificateTypeList(request: DescribeCertificateTypeListRequest): DescribeCertificateTypeListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCertificateTypeListWithOptions(request, runtime);
}

model DescribeDeviceListRequest {
  sourceIp?: string(name='SourceIp'),
  pageSize?: int32(name='PageSize'),
  currentPage?: int32(name='CurrentPage'),
  keyword?: string(name='Keyword'),
  projectId?: string(name='ProjectId'),
}

model DescribeDeviceListResponseBody = {
  totalCount?: long(name='TotalCount'),
  requestId?: string(name='RequestId'),
  deviceList?: [ 
    {
      deviceName?: string(name='DeviceName'),
      deviceStatus?: string(name='DeviceStatus'),
      categoryName?: string(name='CategoryName'),
      memoName?: string(name='MemoName'),
      iotId?: string(name='IotId'),
    }
  ](name='DeviceList'),
}

model DescribeDeviceListResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeDeviceListResponseBody(name='body'),
}

async function describeDeviceListWithOptions(request: DescribeDeviceListRequest, runtime: Util.RuntimeOptions): DescribeDeviceListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeDeviceList', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeDeviceList(request: DescribeDeviceListRequest): DescribeDeviceListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDeviceListWithOptions(request, runtime);
}

model DescribeExcelAnalysisResultRequest {
  sourceIp?: string(name='SourceIp'),
  key?: string(name='Key'),
  projectId?: string(name='ProjectId'),
}

model DescribeExcelAnalysisResultResponseBody = {
  requestId?: string(name='RequestId'),
  excelResult?: {
    insertCount?: int32(name='InsertCount'),
    updateCount?: int32(name='UpdateCount'),
    errorCount?: int32(name='ErrorCount'),
    errorLine?: [ string ](name='ErrorLine'),
    total?: int32(name='Total'),
  }(name='ExcelResult'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model DescribeExcelAnalysisResultResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeExcelAnalysisResultResponseBody(name='body'),
}

async function describeExcelAnalysisResultWithOptions(request: DescribeExcelAnalysisResultRequest, runtime: Util.RuntimeOptions): DescribeExcelAnalysisResultResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeExcelAnalysisResult', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeExcelAnalysisResult(request: DescribeExcelAnalysisResultRequest): DescribeExcelAnalysisResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeExcelAnalysisResultWithOptions(request, runtime);
}

model DescribeIdentifyRecordListRequest {
  sourceIp?: string(name='SourceIp'),
  groupName?: string(name='GroupName'),
  deviceName?: string(name='DeviceName'),
  pageSize?: int32(name='PageSize'),
  startTime?: long(name='StartTime'),
  endTime?: long(name='EndTime'),
  currentPage?: int32(name='CurrentPage'),
  userName?: string(name='UserName'),
  certificateNo?: string(name='CertificateNo'),
  phoneNo?: string(name='PhoneNo'),
  projectId?: string(name='ProjectId'),
}

model DescribeIdentifyRecordListResponseBody = {
  totalCount?: long(name='TotalCount'),
  requestId?: string(name='RequestId'),
  recordList?: [ 
    {
      capturedImage?: string(name='CapturedImage'),
      deviceName?: string(name='DeviceName'),
      groupName?: string(name='GroupName'),
      userId?: int32(name='UserId'),
      identifyingImage?: string(name='IdentifyingImage'),
      gmtCreate?: long(name='GmtCreate'),
      userName?: string(name='UserName'),
      iotId?: string(name='IotId'),
    }
  ](name='RecordList'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model DescribeIdentifyRecordListResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeIdentifyRecordListResponseBody(name='body'),
}

async function describeIdentifyRecordListWithOptions(request: DescribeIdentifyRecordListRequest, runtime: Util.RuntimeOptions): DescribeIdentifyRecordListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeIdentifyRecordList', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeIdentifyRecordList(request: DescribeIdentifyRecordListRequest): DescribeIdentifyRecordListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIdentifyRecordListWithOptions(request, runtime);
}

model DescribeMnsOauthRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
}

model DescribeMnsOauthResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    topicList?: [ string ](name='TopicList'),
    topicName?: string(name='TopicName'),
    mnsAuthorized?: boolean(name='MnsAuthorized'),
    endPoint?: string(name='EndPoint'),
    mnsServe?: boolean(name='MnsServe'),
    openMnsService?: boolean(name='OpenMnsService'),
  }(name='Data'),
}

model DescribeMnsOauthResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeMnsOauthResponseBody(name='body'),
}

async function describeMnsOauthWithOptions(request: DescribeMnsOauthRequest, runtime: Util.RuntimeOptions): DescribeMnsOauthResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeMnsOauth', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeMnsOauth(request: DescribeMnsOauthRequest): DescribeMnsOauthResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMnsOauthWithOptions(request, runtime);
}

model DescribeOssOauthRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
}

model DescribeOssOauthResponseBody = {
  requestId?: string(name='RequestId'),
  data?: {
    ossServe?: boolean(name='OssServe'),
    bucketName?: string(name='BucketName'),
    openOssService?: boolean(name='OpenOssService'),
    ossAuthorized?: boolean(name='OssAuthorized'),
    openOssTime?: long(name='OpenOssTime'),
  }(name='Data'),
}

model DescribeOssOauthResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeOssOauthResponseBody(name='body'),
}

async function describeOssOauthWithOptions(request: DescribeOssOauthRequest, runtime: Util.RuntimeOptions): DescribeOssOauthResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeOssOauth', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeOssOauth(request: DescribeOssOauthRequest): DescribeOssOauthResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeOssOauthWithOptions(request, runtime);
}

model DescribeSignedUrlRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
  key?: string(name='Key'),
}

model DescribeSignedUrlResponseBody = {
  requestId?: string(name='RequestId'),
  code?: int32(name='Code'),
  imgUrl?: string(name='ImgUrl'),
  success?: boolean(name='Success'),
}

model DescribeSignedUrlResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeSignedUrlResponseBody(name='body'),
}

async function describeSignedUrlWithOptions(request: DescribeSignedUrlRequest, runtime: Util.RuntimeOptions): DescribeSignedUrlResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeSignedUrl', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeSignedUrl(request: DescribeSignedUrlRequest): DescribeSignedUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSignedUrlWithOptions(request, runtime);
}

model DescribeTopicRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
  endPoint?: string(name='EndPoint'),
}

model DescribeTopicResponseBody = {
  requestId?: string(name='RequestId'),
  data?: [ string ](name='Data'),
}

model DescribeTopicResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeTopicResponseBody(name='body'),
}

async function describeTopicWithOptions(request: DescribeTopicRequest, runtime: Util.RuntimeOptions): DescribeTopicResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeTopic', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeTopic(request: DescribeTopicRequest): DescribeTopicResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeTopicWithOptions(request, runtime);
}

model DescribeUploadPreSignRequest {
  sourceIp?: string(name='SourceIp'),
}

model DescribeUploadPreSignResponseBody = {
  policy?: string(name='Policy'),
  expire?: string(name='Expire'),
  requestId?: string(name='RequestId'),
  accessId?: string(name='AccessId'),
  signature?: string(name='Signature'),
  host?: string(name='Host'),
  code?: int32(name='Code'),
  key?: string(name='Key'),
  success?: boolean(name='Success'),
}

model DescribeUploadPreSignResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeUploadPreSignResponseBody(name='body'),
}

async function describeUploadPreSignWithOptions(request: DescribeUploadPreSignRequest, runtime: Util.RuntimeOptions): DescribeUploadPreSignResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeUploadPreSign', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeUploadPreSign(request: DescribeUploadPreSignRequest): DescribeUploadPreSignResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUploadPreSignWithOptions(request, runtime);
}

model DescribeUserGroupListRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
}

model DescribeUserGroupListResponseBody = {
  requestId?: string(name='RequestId'),
  data?: [ 
    {
      groupName?: string(name='GroupName'),
      groupUserCount?: int32(name='GroupUserCount'),
      id?: long(name='Id'),
    }
  ](name='Data'),
  success?: boolean(name='Success'),
}

model DescribeUserGroupListResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeUserGroupListResponseBody(name='body'),
}

async function describeUserGroupListWithOptions(request: DescribeUserGroupListRequest, runtime: Util.RuntimeOptions): DescribeUserGroupListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeUserGroupList', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeUserGroupList(request: DescribeUserGroupListRequest): DescribeUserGroupListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUserGroupListWithOptions(request, runtime);
}

model DescribeUserInfoListRequest {
  sourceIp?: string(name='SourceIp'),
  pageSize?: int32(name='PageSize'),
  userName?: string(name='UserName'),
  currentPage?: int32(name='CurrentPage'),
  certificateNo?: string(name='CertificateNo'),
  phoneNo?: string(name='PhoneNo'),
  userGroupId?: long(name='UserGroupId'),
  projectId?: string(name='ProjectId'),
}

model DescribeUserInfoListResponseBody = {
  totalCount?: long(name='TotalCount'),
  requestId?: string(name='RequestId'),
  userInfoList?: [ 
    {
      sex?: int32(name='Sex'),
      certificateType?: string(name='CertificateType'),
      birthday?: long(name='Birthday'),
      phoneNo?: string(name='PhoneNo'),
      groupName?: string(name='GroupName'),
      userGroupId?: long(name='UserGroupId'),
      identifyingImage?: string(name='IdentifyingImage'),
      userName?: string(name='UserName'),
      certificateNo?: string(name='CertificateNo'),
      id?: long(name='Id'),
    }
  ](name='UserInfoList'),
}

model DescribeUserInfoListResponse = {
  headers: map[string]string(name='headers'),
  body: DescribeUserInfoListResponseBody(name='body'),
}

async function describeUserInfoListWithOptions(request: DescribeUserInfoListRequest, runtime: Util.RuntimeOptions): DescribeUserInfoListResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('DescribeUserInfoList', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function describeUserInfoList(request: DescribeUserInfoListRequest): DescribeUserInfoListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeUserInfoListWithOptions(request, runtime);
}

model GetAccountProjectRequest {
  sourceIp?: string(name='SourceIp'),
}

model GetAccountProjectResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  list?: [ 
    {
      projectId?: string(name='ProjectId'),
      projectName?: string(name='ProjectName'),
    }
  ](name='List'),
  success?: boolean(name='Success'),
}

model GetAccountProjectResponse = {
  headers: map[string]string(name='headers'),
  body: GetAccountProjectResponseBody(name='body'),
}

async function getAccountProjectWithOptions(request: GetAccountProjectRequest, runtime: Util.RuntimeOptions): GetAccountProjectResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('GetAccountProject', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function getAccountProject(request: GetAccountProjectRequest): GetAccountProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAccountProjectWithOptions(request, runtime);
}

model SaveMnsServeRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
  topicName?: string(name='TopicName'),
  endPoint?: string(name='EndPoint'),
}

model SaveMnsServeResponseBody = {
  requestId?: string(name='RequestId'),
}

model SaveMnsServeResponse = {
  headers: map[string]string(name='headers'),
  body: SaveMnsServeResponseBody(name='body'),
}

async function saveMnsServeWithOptions(request: SaveMnsServeRequest, runtime: Util.RuntimeOptions): SaveMnsServeResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SaveMnsServe', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function saveMnsServe(request: SaveMnsServeRequest): SaveMnsServeResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveMnsServeWithOptions(request, runtime);
}

model SaveOssServeRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
}

model SaveOssServeResponseBody = {
  requestId?: string(name='RequestId'),
}

model SaveOssServeResponse = {
  headers: map[string]string(name='headers'),
  body: SaveOssServeResponseBody(name='body'),
}

async function saveOssServeWithOptions(request: SaveOssServeRequest, runtime: Util.RuntimeOptions): SaveOssServeResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SaveOssServe', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function saveOssServe(request: SaveOssServeRequest): SaveOssServeResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveOssServeWithOptions(request, runtime);
}

model SaveUserGroupRequest {
  sourceIp?: string(name='SourceIp'),
  groupName?: string(name='GroupName'),
  projectId?: string(name='ProjectId'),
}

model SaveUserGroupResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  data?: {
    gmtCreate?: long(name='GmtCreate'),
    id?: long(name='Id'),
  }(name='Data'),
  success?: boolean(name='Success'),
}

model SaveUserGroupResponse = {
  headers: map[string]string(name='headers'),
  body: SaveUserGroupResponseBody(name='body'),
}

async function saveUserGroupWithOptions(request: SaveUserGroupRequest, runtime: Util.RuntimeOptions): SaveUserGroupResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SaveUserGroup', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function saveUserGroup(request: SaveUserGroupRequest): SaveUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveUserGroupWithOptions(request, runtime);
}

model SaveUserInfoRequest {
  sourceIp?: string(name='SourceIp'),
  userGroupId?: long(name='UserGroupId'),
  birthday?: long(name='Birthday'),
  imageBase64?: string(name='ImageBase64'),
  groupName?: string(name='GroupName'),
  imageUrl?: string(name='ImageUrl'),
  sex?: int32(name='Sex'),
  userName?: string(name='UserName'),
  certificateNo?: string(name='CertificateNo'),
  phoneNo?: string(name='PhoneNo'),
  certificateType?: string(name='CertificateType'),
  projectId?: string(name='ProjectId'),
}

model SaveUserInfoResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  data?: {
    gmtCreate?: long(name='GmtCreate'),
    id?: long(name='Id'),
  }(name='Data'),
  success?: boolean(name='Success'),
}

model SaveUserInfoResponse = {
  headers: map[string]string(name='headers'),
  body: SaveUserInfoResponseBody(name='body'),
}

async function saveUserInfoWithOptions(request: SaveUserInfoRequest, runtime: Util.RuntimeOptions): SaveUserInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('SaveUserInfo', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function saveUserInfo(request: SaveUserInfoRequest): SaveUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveUserInfoWithOptions(request, runtime);
}

model UnbindDeviceRequest {
  sourceIp?: string(name='SourceIp'),
  iotId?: string(name='IotId'),
  projectId?: string(name='ProjectId'),
}

model UnbindDeviceResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model UnbindDeviceResponse = {
  headers: map[string]string(name='headers'),
  body: UnbindDeviceResponseBody(name='body'),
}

async function unbindDeviceWithOptions(request: UnbindDeviceRequest, runtime: Util.RuntimeOptions): UnbindDeviceResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UnbindDevice', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function unbindDevice(request: UnbindDeviceRequest): UnbindDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindDeviceWithOptions(request, runtime);
}

model UpdateDeviceControlInfoRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
  iotId?: long(name='IotId'),
  multiPerson?: int32(name='MultiPerson'),
  controlDoorTime?: int32(name='ControlDoorTime'),
  enableMeasureTempurature?: int32(name='EnableMeasureTempurature'),
  speedClock?: int32(name='SpeedClock'),
}

model UpdateDeviceControlInfoResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model UpdateDeviceControlInfoResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateDeviceControlInfoResponseBody(name='body'),
}

async function updateDeviceControlInfoWithOptions(request: UpdateDeviceControlInfoRequest, runtime: Util.RuntimeOptions): UpdateDeviceControlInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateDeviceControlInfo', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateDeviceControlInfo(request: UpdateDeviceControlInfoRequest): UpdateDeviceControlInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceControlInfoWithOptions(request, runtime);
}

model UpdateDeviceNameRequest {
  sourceIp?: string(name='SourceIp'),
  iotId?: string(name='IotId'),
  projectId?: string(name='ProjectId'),
  deviceName?: string(name='DeviceName'),
}

model UpdateDeviceNameResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model UpdateDeviceNameResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateDeviceNameResponseBody(name='body'),
}

async function updateDeviceNameWithOptions(request: UpdateDeviceNameRequest, runtime: Util.RuntimeOptions): UpdateDeviceNameResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateDeviceName', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateDeviceName(request: UpdateDeviceNameRequest): UpdateDeviceNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceNameWithOptions(request, runtime);
}

model UpdateProjectNameRequest {
  sourceIp?: string(name='SourceIp'),
  projectId?: string(name='ProjectId'),
  projectName?: string(name='ProjectName'),
}

model UpdateProjectNameResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model UpdateProjectNameResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateProjectNameResponseBody(name='body'),
}

async function updateProjectNameWithOptions(request: UpdateProjectNameRequest, runtime: Util.RuntimeOptions): UpdateProjectNameResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateProjectName', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateProjectName(request: UpdateProjectNameRequest): UpdateProjectNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateProjectNameWithOptions(request, runtime);
}

model UpdateUserGroupRequest {
  sourceIp?: string(name='SourceIp'),
  groupId?: long(name='GroupId'),
  groupName?: string(name='GroupName'),
  projectId?: string(name='ProjectId'),
}

model UpdateUserGroupResponseBody = {
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateUserGroupResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateUserGroupResponseBody(name='body'),
}

async function updateUserGroupWithOptions(request: UpdateUserGroupRequest, runtime: Util.RuntimeOptions): UpdateUserGroupResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateUserGroup', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateUserGroup(request: UpdateUserGroupRequest): UpdateUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserGroupWithOptions(request, runtime);
}

model UpdateUserInfoRequest {
  sourceIp?: string(name='SourceIp'),
  userGroupId?: long(name='UserGroupId'),
  birthday?: long(name='Birthday'),
  imageBase64?: string(name='ImageBase64'),
  groupName?: string(name='GroupName'),
  imageUrl?: string(name='ImageUrl'),
  sex?: int32(name='Sex'),
  userName?: string(name='UserName'),
  userId?: long(name='UserId'),
  certificateNo?: string(name='CertificateNo'),
  phoneNo?: string(name='PhoneNo'),
  certificateType?: string(name='CertificateType'),
  projectId?: string(name='ProjectId'),
  overwriteImg?: boolean(name='OverwriteImg'),
}

model UpdateUserInfoResponseBody = {
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateUserInfoResponse = {
  headers: map[string]string(name='headers'),
  body: UpdateUserInfoResponseBody(name='body'),
}

async function updateUserInfoWithOptions(request: UpdateUserInfoRequest, runtime: Util.RuntimeOptions): UpdateUserInfoResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UpdateUserInfo', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function updateUserInfo(request: UpdateUserInfoRequest): UpdateUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserInfoWithOptions(request, runtime);
}

model UploadIdentifyRecordRequest {
  sourceIp?: string(name='SourceIp'),
  userId?: long(name='UserId'),
  userName?: string(name='UserName'),
  projectId?: string(name='ProjectId'),
  iotId?: string(name='IotId'),
  identifyingImageBase64?: string(name='IdentifyingImageBase64'),
  identifyingTime?: long(name='IdentifyingTime'),
  identifyingImageUrl?: string(name='IdentifyingImageUrl'),
  deviceName?: string(name='DeviceName'),
}

model UploadIdentifyRecordResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model UploadIdentifyRecordResponse = {
  headers: map[string]string(name='headers'),
  body: UploadIdentifyRecordResponseBody(name='body'),
}

async function uploadIdentifyRecordWithOptions(request: UploadIdentifyRecordRequest, runtime: Util.RuntimeOptions): UploadIdentifyRecordResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('UploadIdentifyRecord', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function uploadIdentifyRecord(request: UploadIdentifyRecordRequest): UploadIdentifyRecordResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadIdentifyRecordWithOptions(request, runtime);
}

model VerifyAccountProjectRequest {
  sourceIp?: string(name='SourceIp'),
}

model VerifyAccountProjectResponseBody = {
  requestId?: string(name='RequestId'),
  httpStatusCode?: int32(name='HttpStatusCode'),
  success?: boolean(name='Success'),
}

model VerifyAccountProjectResponse = {
  headers: map[string]string(name='headers'),
  body: VerifyAccountProjectResponseBody(name='body'),
}

async function verifyAccountProjectWithOptions(request: VerifyAccountProjectRequest, runtime: Util.RuntimeOptions): VerifyAccountProjectResponse {
  Util.validateModel(request);
  var req = new OpenApi.OpenApiRequest{ 
    body = Util.toMap(request),
  };
  return doRPCRequest('VerifyAccountProject', '2019-02-19', 'HTTPS', 'POST', 'AK', 'json', req, runtime);
}

async function verifyAccountProject(request: VerifyAccountProjectRequest): VerifyAccountProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyAccountProjectWithOptions(request, runtime);
}

